package com.buli.blmall.admin.exception;

import com.buli.blmall.admin.exception.error.LoginErrorCode;

/**
 * @author xiang.gao
 * @date 2024/12/18 16:32
 */
public class LoginException extends RuntimeException {

    private int code = 400;
    private String message = "登录失败";

    public LoginException(String message) {
        super(message);
    }

    public LoginException(LoginErrorCode loginErrorCode) {
        this.code = loginErrorCode.getCode();
        this.message = loginErrorCode.getMesage();
    }

    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
